{% extends "RangeFindOneClickBundle::layout.html.twig" %}
{% block title %} {{ parent() }} - Ajouter un objet {% endblock %}
{% block middle %}
		<fieldset>
			<legend>Ajouter un objet</legend>
			<form action="#" method="post">
					{{ form_errors(form) }}
					<p>
						<label>{{ form_label(form.identifiant) }}</label>
						{{ form_widget(form.identifiant, {"attr" : {"data-inline" : "true"}}) }}
					</p>
					<p>
						<label>{{ form_label(form.titre) }}</label>
						{{ form_widget(form.titre) }}
					</p>
					<p>
						<label>{{ form_label(form.description) }}</label>
						{{ form_widget(form.description) }}
					</p>
					<p>
						<label>{{ form_label(form.photo.name) }}</label>
						{{ form_widget(form.photo.name) }}
					</p>
					<p>
						<label>{{ form_label(form.photo.fichier) }}</label>
						{{ form_widget(form.photo.fichier) }}
					</p>
					<p>
						{{ form_label(form.date) }}
						<div data-role="controlgroup" data-type="horizontal" data-inline="true">
							{{ form_widget(form.date) }}
						</div>
					</p>
					<p>
						<label>{{ form_label(form.location) }}</label>
						<div data-role="controlgroup" data-type="horizontal" data-inline="true">
							{{ form_widget(form.location) }} 
							<a href="{{ path('RangeFindOneClickBundle_addLocation') }}" data-rel="dialog" data-role="button" data-icon="add">Ajouter</a>
						</div>
					</p>
					<p>
						<label>Tags : </label>
						<input type="text" class="tag" id="tag" data-icon="add" select-target="#range_findoneclickbundle_objettype_tags" world-update="{{ path('RangeFindOneClickBundle_getTagId') }}">
					</p>
					<p style="display: none;">
						<label>{{ form_label(form.tags) }}</label>
						{{ form_widget(form.tags, { "attr" : { "data-role" : "none"}}) }}
					</p>
					
					{{ form_rest(form) }}
				<input type="submit" value="Ajouter">
			</form>
		
{% endblock %}
